#include "desktopactivator.h"

DesktopActivator::DesktopActivator()
{

}

void DesktopActivator::start(ctkPluginContext *context)
{
    qDebug() << Q_FUNC_INFO << "插件启动";
    m_mainWindow = new MainWindow(context);
    m_mainWindow->setWindowTitle("CTK Plugin Framework 示例");
    m_mainWindow->showMaximized();
}

void DesktopActivator::stop(ctkPluginContext *context)
{
    Q_UNUSED(context)
    if(nullptr != m_mainWindow)
    {
        m_mainWindow = nullptr;
    }
    qDebug() << Q_FUNC_INFO;
}

#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2(Desktop, DesktopActivator)
#endif
